home *** CD-ROM | disk | FTP | other *** search
- {--------------------------- Angle Calc --------------------------
-
- { This Macro calculates the included angle of three point that you locate.
-
- { Remember the first point in variable &Pt1 and put a point marker there
- Prompt `Locate first point:` &pt1 Coord
- Pt [&Pt1|;]
-
- { Remember the second point in variable &Pt2 and put a point marker there
- { Remember the angle from &Pt1 to &Pt2 in variable #Angle1
- Prompt `Locate second point:` &pt2 Coord
- #Angle1 = %cd.angle
- Pt [&Pt2|;]
- If (#Angle1 < 0), #Angle1=#Angle1+180
- LL,B,A,.125,.0625 [&pt1|&pt2|;]
-
- { Remember the third point in variable &Pt3 and put a point marker there
- { Remember the angle from &Pt2 to &Pt3 in variable #Angle2
- Prompt `Locate third point:` &pt3 Coord
- #Angle2 = %cd.angle
- Pt [&Pt3|;]
- LL,B,A,.125,.0625 [&pt2|&pt3|;]
-
- If (#Angle2 < 0), #Angle2=#Angle2+180
-
- { Delete the point markers
- Delete [-|-|-|-|-|;]
-
- { Calculate difference between the two angles,
- { make the number positive and remember it in the variable #A
- If (#Angle1 > #Angle2), Goto FIG:
- #A = #Angle2 - #Angle1
- Goto END:
- FIG:
- #A = #Angle1 - #Angle2
- END:
- { Issue a message to the operator to tell him what the angle was
- Message \The included angle is: #A Remembered in variable `#A`.\ Time=0
-
- Return
-
-
-